﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace school
{
    public partial class studesktop : Form
    {
        public studesktop()
        {
            InitializeComponent();
        }

        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            aboutSystem f0 = new aboutSystem();
            f0.TopLevel = false;
            f0.FormBorderStyle = FormBorderStyle.None;
            f0.WindowState = FormWindowState.Maximized;

            panel1.Controls.Add(f0);
            f0.Show();
            switch (this.treeView1.SelectedNode.Text)
            {
                case "修改密码":
                    treeselect_textBox.Text = "修改密码";
                    stuchangepassword f1 = new stuchangepassword();
                    f1.TopLevel = false;
                    f1.FormBorderStyle = FormBorderStyle.None;
                    f1.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f1);
                    f1.Show();
                    break;

                case "个人信息":
                    treeselect_textBox.Text = "个人信息";
                    stushowinformation f2 = new stushowinformation();
                    f2.TopLevel = false;
                    f2.FormBorderStyle = FormBorderStyle.None;
                    f2.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f2);
                    f2.Show();
                    break;

                case "我的课程表":
                    treeselect_textBox.Text = "我的课程表";
                    myclassschedule f3 = new myclassschedule();
                    f3.TopLevel = false;
                    f3.FormBorderStyle = FormBorderStyle.None;
                    f3.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f3);
                    f3.Show();
                    break;

                case "选课中心":
                    treeselect_textBox.Text = "选课中心";
                    stucourseselectioncenter f4 = new stucourseselectioncenter();
                    f4.TopLevel = false;
                    f4.FormBorderStyle = FormBorderStyle.None;
                    f4.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f4);
                    f4.Show();
                    break;

                case "我的成绩单":
                    treeselect_textBox.Text = "我的成绩单";
                    stumysources f5 = new stumysources();
                    f5.TopLevel = false;
                    f5.FormBorderStyle = FormBorderStyle.None;
                    f5.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f5);
                    f5.Show();
                    break;

                case "退出系统":
                    Application.Exit();
                    break;

                case "查询课程":
                    treeselect_textBox.Text = "查询课程";
                    aboutsource f6 = new aboutsource();
                    f6.TopLevel = false;
                    f6.FormBorderStyle = FormBorderStyle.None;
                    f6.WindowState = FormWindowState.Maximized;

                    panel1.Controls.Add(f6);
                    f6.Show();
                    break;
            }
        }

        private void treeselect_textBox_TextChanged(object sender, EventArgs e)
        {

        }

        private void panel1_Paint(object sender, PaintEventArgs e)
        {

        }
    }
}
